***********************************************************************************************
***
***	INTERTEMPORAL EVIDENCE ON THE STRATEGY OF POPULISM IN THE US (Gennaro, Lecce, Morelli)
***	Replication Package
***  
*** Appendix - Table A21
***
***********************************************************************************************



clear
est clear 

* Indicate location of the replication package here
cd "/Replication Package"


use "3_data/for_analysis/mobilization_data_2018.dta"


global demo "white male agedec week"
global pers "married rel urbancity" 
global income "educ2 empl2" 
global cond "cit1==1 & uncontested==0 & competiti==1 & registered==1"

eststo m1: reghdfe survey c.pop_s if $cond & core==1, cl(state#district#rep) a(state#district $demo $pers $income ) 
eststo m2: reghdfe survey c.pop_s if $cond & core==0, cl(state#district#rep) a(state#district $demo $pers $income  ) 
eststo m3: reghdfe survey i.core##c.pop_s if $cond, cl(state#district#rep) a(state#district#core $demo $pers $income  ) 
eststo m3a: reghdfe survey i.core##c.pop_s if $cond, cl(state#district#rep) a(state#district#core $demo $pers $income rep ) 
eststo m3b: reghdfe survey i.core##c.pop_s if $cond, cl(state#district#rep) a(state#district#core $demo $pers $income ideo5) 


eststo m4: reghdfe voted c.pop_s if $cond & core==1, cl(state#district#rep) a(state#district $demo $pers $income ) 
eststo m5: reghdfe voted c.pop_s if $cond & core==0, cl(state#district#rep) a(state#district $demo $pers $income ) 
eststo m6: reghdfe voted i.core##c.pop_s if $cond, cl(state#district#rep) a(state#district#core $demo $pers $income ) 
eststo m6a: reghdfe voted i.core##c.pop_s if $cond, cl(state#district#rep) a(state#district#core $demo $pers $income rep ) 
eststo m6b: reghdfe voted i.core##c.pop_s if $cond, cl(state#district#rep) a(state#district#core $demo $pers $income ideo5) 

eststo m7: reghdfe voted c.pop_s if $cond  & validated==1 & core==1, cl(state#district#rep) a(state#district $demo $pers $income ) 
eststo m8: reghdfe voted c.pop_s if $cond  & validated==1 & core==0, cl(state#district#rep) a(state#district $demo $pers $income ) 
eststo m9: reghdfe voted i.core##c.pop_s if $cond & validated==1, cl(state#district) a(state#district#core $demo $pers $income )
eststo m9a: reghdfe voted i.core##c.pop_s if $cond & validated==1, cl(state#district) a(state#district#core $demo $pers $income rep)
eststo m9b: reghdfe voted i.core##c.pop_s if $cond & validated==1, cl(state#district) a(state#district#core $demo $pers $income ideo5)


esttab m1 m2 m3 m3a m3b m4 m5 m6 m6a m6b m7 m8 m9 m9a m9b using "4_results/tables/tabA21.tex", f label replace booktabs alignment(D{.}{.}{-1}) ///
keep(pop_s 1.core#c.pop_s) s(N r2, fmt(0 2) label("Observations" "R-squared")) nomtitles star(* 0.10 ** 0.05 *** 0.01) r2 b(3) se(3) brac nonotes


